/**
 * @author moonlan
 * date 2021/5/31 8:05
 */
@SuppressWarnings(value = "unused")
public class LogProxy implements Proxy {

    private final Service service;

    public LogProxy(Service service) {this.service = service;}

    @Override
    public void method() {
        try {
            service.method();
        } catch (Exception e) {
            System.out.println("调用method失败");
            return;
        }
        System.out.println("调用method成功");
    }
}
